<template>
  <div class="feedback-group">
    <div v-for="(item, index) in msgData" :key="index">
      <div class="feedback-user" :class="{'feedback-user-margin':item.replyFlag}">
        <img src="/img/user.png" class="feedback-user-img">
        <p class="feedback-user-text">{{item.orgName}}</p>
        <p class="feedback-user-time">{{item.msgTime}}</p>
      </div>
      <div class="feedback-content" :class="{'feedback-margin':item.replyFlag}">{{item.msgContent}}</div>
    </div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: "consultMsg",
  props: {
    msgData: {
      type: Array,
      default: () => []
    }
  },
  methods: {

  }
};
</script>

<style lang="scss">
  .feedback-group {
    padding: 20px;
    margin-bottom: 50px;
  }
  .feedback-user {
    margin-right: 6px;
    width: 95%;
  }
  .feedback-user-img {
    width: 21px;
    position: relative;
    top: 4px;
  }
  .feedback-user-text {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    margin-left: 0.2rem;
  }
  .feedback-user-time {
    float: right;
  }
  .feedback-content{
    width: 93%;
    float: right;
    height: 30px;
    line-height: 30px;
    background-color: #e8e8e8;
    border: 1px solid #d2d2d2;
    padding-left: 12px;
    margin-right: 40px;
  }
  .feedback-user-margin{
    width:90%;
    margin-left: 5%;
  }
  .feedback-margin{
    width:88%;
  }
</style>
